<template>
  <div v-if="assembleData">
    <div
        style="margin-left: 20px"
        v-if="assembleData.class === 'complex'"
    >
      <ComplexExpressions :info="assembleData"></ComplexExpressions>
      <template v-if="assembleData.conditions.length > 0">
        <div>
          <Assemble
              v-for="(item, index) in assembleData.conditions"
              :key="index"
              :assembleData="item"
              :previous="assembleData"
              :indexKey="index"
          ></Assemble>
        </div>
      </template>
    </div>
    <div
        style="margin-left: 20px"
        v-if="assembleData.class === 'simple'"
    >
      <SimplenessExpressions
          :info="assembleData"
          :previousInfo="previous"
          :indexInfo="indexKey"
      ></SimplenessExpressions>
    </div>
  </div>
</template>

<script>
import ComplexExpressions from "@/pages/systemManage/abstractionList/condition/ComplexExpressions";
import SimplenessExpressions from "@/pages/systemManage/abstractionList/condition/SimplenessExpressions";

export default {
  name: "Assemble",
  components: {SimplenessExpressions, ComplexExpressions},
  props: {
    assembleData: Object,
    previous: Object,
    indexKey: Number
  }
}
</script>

<style scoped>

</style>
